/**
 * <p>Title: Data Capture System</p>
 * <p>Description: 陕西省地税渭南-餐饮业定税系统</p>
 * <p>Copyright: Copyright (c) 2010-2015 Shangxi Local Goverment Tax of Weinan</p>
 * <p>Company: Andy</p>
 */
package com.sxds.wn.dao.biz.impl;

import java.util.List;
import java.util.Map;

import com.sxds.wn.bo.HotelTypeBo;
import com.sxds.wn.bo.HotelTypeDetailBo;
import com.sxds.wn.dao.biz.CodeDao;
import com.sxds.wn.dao.ibatis.AbstractIbatisDao;
import com.sxds.wn.exception.DataAccessException;

/**
 * Description: <p>代码数据访问接口</p>
 * Content Desc:<p><p>
 * Copy Right of Geong
 * @author Tangtao Email:<a href="mailto:tangtao7481@yahoo.com.cn">tangtao7481@yahoo.com.cn</a>
 * @version 1.0 Create Date:@2010-6-8
 */
public class CodeDaoImpl extends AbstractIbatisDao implements CodeDao {

	/* (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#getCessLevel(java.util.Map)
	 */
	public List getCessLevel(Map params) throws DataAccessException {
		return this.getSqlMapClientTemplate().queryForList("getCessLevel",params);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#getHotelType(java.util.Map)
	 */
	public List getHotelType(Map params) throws DataAccessException {
		return this.getSqlMapClientTemplate().queryForList("getHotelType",params);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#getHotelPropertyType(java.util.Map)
	 */
	public List getHotelPropertyType(Map params) throws DataAccessException {
		return this.getSqlMapClientTemplate().queryForList("getHotelPropertyType",params);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#insertHotelType(com.sxds.wn.bo.HotelTypeBo)
	 */
	public void insertHotelType(HotelTypeBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().insert("insertHotelType",bo);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#insertHotelTypeDetailBo(com.sxds.wn.bo.HotelTypeDetailBo)
	 */
	public void insertHotelTypeDetail(HotelTypeDetailBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().insert("insertHotelTypeDetail",bo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#deleteHoteTypeDetailBo(com.sxds.wn.bo.HotelTypeDetailBo)
	 */
	public void deleteHoteTypeDetail(HotelTypeDetailBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().delete("deleteHoteTypeDetail",bo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#deleteHotelType(com.sxds.wn.bo.HotelTypeBo)
	 */
	public void deleteHotelType(HotelTypeBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().delete("deleteHotelType",bo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#updateHotelType(com.sxds.wn.bo.HotelTypeBo)
	 */
	public void updateHotelType(HotelTypeBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().update("updateHotelType",bo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#updateHotelTypeDetailBo(com.sxds.wn.bo.HotelTypeDetailBo)
	 */
	public void updateHotelTypeDetail(HotelTypeDetailBo bo) throws DataAccessException {
		this.getSqlMapClientTemplate().update("updateHotelTypeDetail",bo);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#getHotelTypeDetail(com.sxds.wn.bo.HotelTypeDetailBo)
	 */
	public HotelTypeDetailBo getHotelTypeDetail(HotelTypeDetailBo bo) throws DataAccessException {
		return getHotelTypeDetail(bo.getFdzlflDm());
	}

	/*
	 * (non-Javadoc)
	 * @see com.sxds.wn.dao.biz.CodeDao#getHotelTypeDetail(java.lang.String)
	 */
	public HotelTypeDetailBo getHotelTypeDetail(String identifyID) throws DataAccessException {
		return (HotelTypeDetailBo)this.getSqlMapClientTemplate().queryForObject("getHotelTypeDetail",identifyID);
	}

}
